package com.spring.liftCycle;

import com.spring.content;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;
import org.springframework.beans.factory.BeanNameAware;
import org.springframework.stereotype.Component;

/**
 * Created by zzy on 2018/4/22.
 */
@Component
@Slf4j
public class theBean implements BeanNameAware,BeanFactoryAware {

    public theBean() {
        log.info("theBean"+ content.getNum());
    }

    @Override
    public void setBeanName(String s) {
        log.info("theBean"+"-"+s+"-"+ content.getNum());

    }

    @Override
    public void setBeanFactory(BeanFactory beanFactory) throws BeansException {
        log.info("theBean"+"-"+beanFactory.getClass().getSimpleName()+"-"+ content.getNum());
    }
}
